#ifndef D_GUITOOLSTATEMANAGER_H
#define D_GUITOOLSTATEMANAGER_H

#include <wx/string.h>

#include "GuiUpdateManager.h"
#include "..\ProjectManagement\ProjectManager.h"

class ProjectManager;
class wxCursor;

class GuiToolState{
	public:
	GuiToolState();
	virtual ~GuiToolState();
	virtual void UserClick(GuiUpdateManager* object, void* data) = 0;
	virtual bool UserMove(GuiUpdateManager* object, void* data);
	virtual void UserHold(GuiUpdateManager* object, void* data);
	virtual void SetToolState(GuiUpdateManager* object, GuiToolState* new_state);
	virtual void SetProjectManager(ProjectManager* project_manager);
	virtual void CleanUp();
	protected:
	static ProjectManager* project_manager_ptr;
	wxCursor* m_cursor;
	bool m_holding_mouse;
	};
	
class GuiToolNullState : public GuiToolState{
	public:
	GuiToolNullState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolAddRectangleState : public GuiToolState{
	public:
	GuiToolAddRectangleState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolAddEllipseState : public GuiToolState{
	public:
	GuiToolAddEllipseState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolAddTextEllipseState : public GuiToolState{
	public:
	GuiToolAddTextEllipseState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolAddDiamondState : public GuiToolState{
	public:
	GuiToolAddDiamondState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolAddTextDiamondState : public GuiToolState{
	public:
	GuiToolAddTextDiamondState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolAddLabelState : public GuiToolState{
	public:
	GuiToolAddLabelState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolAddLabelRectangleState : public GuiToolState{
	public:
	GuiToolAddLabelRectangleState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolSelectElementState : public GuiToolState{
	public:
	GuiToolSelectElementState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	virtual bool UserMove(GuiUpdateManager* object, void* data);
	virtual void UserHold(GuiUpdateManager* object, void* data);
	private:
	 SelectionMode m_selection_mode;
	};
	
class GuiToolDeleteElementState : public GuiToolState{
	public:
	GuiToolDeleteElementState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolMoveElementState : public GuiToolState{
	public:
	GuiToolMoveElementState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolNodeStartState : public GuiToolState{
	public:
	GuiToolNodeStartState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	};
	
class GuiToolNodeStepState : public GuiToolState{
	public:
	GuiToolNodeStepState();
	static GuiToolState* Instance();
	void UserClick(GuiUpdateManager* object, void* data);
	void CleanUp();
	};

#endif